import { http } from '@/utils/http'

export function useAccountsPayApi() {
  return {
    // 获得应付款申请
    getPaymentApply(params: any) {
      return http.get<AccountsPayForm>('/prod-api/admin-api/project/payment-apply/get', params)
    },
    getPAByProcessInstanceId(processInstanceId: string) {
      return http.get<AccountsPayForm>('/prod-api/admin-api/project/payment-apply/getByProcessInstanceId?processInstanceId=' + processInstanceId)
    },
    // 获取付款批次
    optionsPaymentPlanned(contractId: number) {
      return http.get<PlannedPaymentForm[]>('/prod-api/admin-api/project/planned-payment/options?contractId=' + contractId)
    },
    getOptionsPurchaseConstructionContract(projectNumber: string) {
      return http.get<AccountsPayContractForm[]>('/prod-api/admin-api/project/purchase-construction-contract/options?projectNumber=' + projectNumber)
    }
  }
}
